---
- name: Deploy Service
  hosts: srv
  gather_facts: true
  become: yes
  
  vars_files:
    - vars/consul-cluster-global-vars.yml
    
  vars:
    java_artifact: demo-service-0.0.1-SNAPSHOT.jar
    apply_consul_configuration_for_java_app: true
    java_app_consul_property_dump: example-service.consul.config.json
    java_args: "-DCONSUL_ADDRESS=127.0.0.1 -DCONSUL_PORT=8500 -DDEMO_SERVICE_PORT=8080 -Dspring.profiles.active=dev"
    consul_client_acl: true
    
  roles:
    - consul-client
    - java-environment
    - java-application
